import {IndexLink,Link,Route} from 'react-router-dom';
import React from 'react'

const OldSchoolMenuLink = ({ label, to, activeOnlyWhenExact }) => (
  <Route path={to} exact={activeOnlyWhenExact} children={({ match }) => (
    <div className={match ? 'active' : ''}>
      <Link to={to} className={match ? 'active' : ''}>{label}</Link>
    </div>
  )}/>
)
export default OldSchoolMenuLink;